<!--
 * @Author: wangjh wangjiahui0710@163.com
 * @Date: 2024-07-10 09:19:29
 * @LastEditors: wangjh wangjiahui0710@163.com
 * @LastEditTime: 2024-07-16 09:43:14
 * @FilePath: \cip-admin\src\pages\park\parking-maintenance\parking-maintenance\components\handler.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script lang="ts" setup>
import { injectState } from "../state";
import { useUserStore } from "@/stores/user";

defineOptions({ name: "Headler" });

const { selectedList, tableRef, detailDialogRef } = injectState()!;
const userStore = useUserStore();
</script>

<template>
	<div flex="~ justify-between">
		<div flex="~">
			<el-button type="primary" @click="detailDialogRef?.trigger('write')">
				<template #icon>
					<el-icon class="i-custom:add" />
				</template>
				新建
			</el-button>

			<el-button
				:disabled="selectedList.length === 0"
				@click="tableRef?.exportTable('文件', selectedList)"
			>
				<template #icon>
					<el-icon class="i-material-symbols:file-save-outline-rounded" />
				</template>
				导出
			</el-button>
		</div>
	</div>
</template>
